Online-Academy
Look, Read, Understand, Apply

Operating System

OS - Introduction

  1. What are the two bascially unrelated functions performed by operating system?

    Answer

    OS functions as extended machine and resource manager. OS hides the truth about the hardware from the programmer and provides a nice, easy to use, simple view of named files that can be read and written. OS shields user from the hardware and presents a simple file-oriented interface. In this view OS can be considered as extended machine or virtual machine that is easier to program than the underlying hardware.

    The job of operating system is to provide an orderly and controlled allocation of the processes, memories, and I/O devices among the various programs competing for them. When a computer has multiple users, Operating system manages and protects the memory, I/O devices, and other resources so users might not interfer with each other.

  2. What is kernel mode?

    Answer: Operating system is a portion of software that runs in kernel mode or supervisor mode. It is protected from user tampering the hardware.

  3. What do you mean by system calls?

    Answer: System calls are also known as extended instructions. System calls or extended instructions are provided by operating system to interface between the oparating system and the user programs.

  4. What is a process?

    A process is basically a program in execution. Each process is associated with its address space, a list of memory locations, which the process can read and write. The address space contains the program's data, its stack, and the executable program, some set of registers, including the program counter, stack pointer, and other hardware registers, and all teh other information needed to run the program.

  5. Explain process table.

    Answer: Process table is an array (or linked list) of structures which stores all the information about each process, other than the contents of its own address space.

  6. What is a core image related with a process?

    A suspended process consisting of its address space is called the core image.

  7. Explain protection code used to protect file.

    The protection code consists of 3-bit fields, one for the owner, one for other members of the owner's group, and one for everyone else. Each field has a bit for read access, a bit for write access, and a bit for execute access. These bits are known as the rwx bits. For example, the protection code rwxr-x--r means that the owner can read, write or execute the file, other group members can read or execute (but not write) the file, and everyone else can read ( but cannot write or execute) the file. Here, dash means permission is absent.

  8. What are block special files and character special files?

    Answer: Block special files are used to model devices consisting of a collection of randomly addressable blocks, such as disk. Character speical files are used to model printers, modems and other devices as these devices accept or output a character stream.

  9. What is a pipe?

    Answer: A pipe is a sort of pseudofile that is used to connect tow processes together. When a process X wants to send data to process Y, it writes on the pipe. Process Y can read the data by reading from the pipe as though it were an input file.

  10. What are the major designs of operating system?

    Answer:

    • Monolithic System: OS is written as a collection of procedures, each of which can call any of the other ones whether it needs to. It is also known as The big mess.
    • Layered Systems: OS is organized as a hierarchy of layers, each one constructed upon the one below it.
    • Virtual Machine: Runs on the bare hardware and does the multiprogramming, providing not one, but several vistual machines to the next layer up. It is not a extended machine like other operating systems. They are exact copies of the bare hardware, including kernel / user mode, I/O, interrupts, and other components the real machine has.
    • Client-Serve Model: Consists of client process and server process. The kernel does is handle the communication between client and severs.